From 78d2a7ffe38fd41672305f0b70fd59f066a24fb3 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Mon, 21 Nov 2005 18:33:17 +0100 Subject: [PATCH] Return the changed path as an argument to the watch callback. This is useful for the test CD, and simplifies DevController everso slightly. It ought to be generally useful, too. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomain.py | 2 +- tools/python/xen/xend/XendDomainInfo.py | 2 +- tools/python/xen/xend/server/DevController.py | 2 +- tools/python/xen/xend/xenstore/xswatch.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 389e6114a3..b70ae2f8b4 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -114,7 +114,7 @@ class XendDomain: ## private: - def onReleaseDomain(self): + def onReleaseDomain(self, _): self.domains_lock.acquire() try: self.refresh() diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 907c0b1875..e6e6a2e7d0 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -424,7 +424,7 @@ class XendDomainInfo: return [] - def storeChanged(self): + def storeChanged(self, _): log.trace("XendDomainInfo.storeChanged"); changed = False diff --git a/tools/python/xen/xend/server/DevController.py b/tools/python/xen/xend/server/DevController.py index 36226d7c9a..4bb8642226 100644 --- a/tools/python/xen/xend/server/DevController.py +++ b/tools/python/xen/xend/server/DevController.py @@ -328,7 +328,7 @@ class DevController: ev = Event() result = { 'status': Timeout } - xswatch(statusPath, hotplugStatusCallback, statusPath, ev, result) + xswatch(statusPath, hotplugStatusCallback, ev, result) ev.wait(DEVICE_CREATE_TIMEOUT) return result['status'] diff --git a/tools/python/xen/xend/xenstore/xswatch.py b/tools/python/xen/xend/xenstore/xswatch.py index 0f8b60d8b8..8b8bb2d087 100644 --- a/tools/python/xen/xend/xenstore/xswatch.py +++ b/tools/python/xen/xend/xenstore/xswatch.py @@ -51,7 +51,7 @@ def watchMain(): try: we = xs.read_watch() watch = we[1] - res = watch.fn(*watch.args, **watch.kwargs) + res = watch.fn(we[0], *watch.args, **watch.kwargs) if not res: watch.unwatch() except: -- 2.30.2